import React, {useCallback, useState, memo} from 'react';
import {View, StyleSheet, TouchableHighlight, Text} from 'react-native';
import PatIcon from '../../base/PatIcon';
import Colors from '../../../utils/Colors';
const styles = StyleSheet.create({
  addCartBox: {
    marginTop: 10,
    width: '100%',
    backgroundColor: Colors.white,
    paddingTop: 10,
    paddingLeft: 10,
    paddingRight: 10,
    paddingBottom: 10,
  },
  button: {
    color: Colors.white,
    fontSize: 16,
    borderRadius: 10,
    backgroundColor: Colors.patFontRed,
  },
  bt: {
    width: '100%',
    height: 35,
    color: Colors.white,
    borderRadius: 5,
    textAlign: 'center',
    lineHeight: 35,
  },
});

const BaseInfo = props => {
  const {callBack} = props;
  return (
    <View style={styles.addCartBox}>
      <TouchableHighlight
        activeOpacity={0.6}
        underlayColor={Colors.patFontRed}
        onPress={callBack}
        style={styles.button}>
        <Text style={styles.bt}>加入购物车</Text>
      </TouchableHighlight>
    </View>
  );
};

export default BaseInfo;
